package Homework04;

public class Manager extends Staff{
    private double bonus;
    //创造Manager对象的时候，奖金是多少是不确定的，所以在构造器中不赋值

    public Manager(String name, double daySal, int day, double grade) {
        super(name, daySal, day, grade);
    }

    //通过set方法给奖金赋值
    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    //工资为基本工资+奖金
    @Override
    public void printSal() {
        System.out.println("经理" + getName() + "的工资为" +(bonus +  getDaySal() * getDay() * getGrade()));
    }
}
